<?php

use yii\db\Migration;

/**
 * Handles adding columns to table `{{%library_book}}`.
 */
class m230512_070003_add_additional_column_to_library_book_table extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->addColumn('{{%library_book}}', 'inventory_number', $this->string());
        $this->addColumn('{{%library_book}}', 'keywords', $this->string(512));
        $this->addColumn('{{%library_book}}', 'comment', $this->text());
    }

    /**
     * {@inheritdoc}
     */
    public function safeDown()
    {
        $this->dropColumn('{{%library_book}}', 'inventory_number');
        $this->dropColumn('{{%library_book}}', 'keywords');
        $this->dropColumn('{{%library_book}}', 'comment');
    }
}
